#include <string>
#include <hge.h>
#include <hgeresource.h>

#include "FAtypes.h"

using namespace std;

struct FAcharge
{
	FAcharge();
	FAcharge(string name, double attack, double speed, hgeSprite *Sprite);

	void SetName(string name);
	void SetAttack(double attack);
	void SetSpeed(double speed);

	string GetName();
	double GetAttack();
	double GetSpeed();
public:
	hgeSprite *Charge_Sprite;
private:
	string Name;
	double Att;
	double speed_sn;
};

struct FAweapon
{
	FAweapon();
	FAweapon(string name, double Attack, double range, double dispersion, double speed_rest, hgeSprite *Sprite, FAcharge *Char);

	void SetProperties(string name, double Attack, double range_, double dispersion, double speed_rest);
	void SetName(string name);
	void SetAttack(double Attack); 
	void SetRange(double range);
	void SetDisp(double dispersion);
	void SetSpeed_re(double speed_rest);

	void ChangeCharge(FAcharge *Ch);

	string GetName();
	double GetRange();
	double GetAttack();
	double GetDisp();
	double GetSpeed();

public:
	hgeSprite *Weap_Sprite;
private:
	string Name;
	double att;
	double range; //If range = 0 then short-range Weapon
	double disp;
	double speed_re;
	FAcharge *Charge;
};

struct FAbones
{
	FAbones();
	FAbones(int ID, FApoint StartPoint, FApoint EndPoint, hgeSprite *Sprite);

	void SetBoneRect(hgeSprite *Sprite);

	FApoint GetStartPoint();
	FApoint GetEndPoint();
public:
	hgeSprite *Bone_Sprite;
private:
	int ID;
	FArectangle Bone_Rect;

	FApoint StartPoint;
	FApoint EndPoint;
};

struct FAskelet
{
	FAskelet();

	void AddBone(FAbones bone);
//	void CreatePeopleSkelet();
//	void CreateAnimalSkelet();
private:
	void RemoveBone();
};

struct FAcharacters
{
	FAcharacters();

	FAcharacters(string Chname, unsigned int HealthPoint,unsigned int Stamina, unsigned int Attack, unsigned int Defend,double speed, FApoint *Pt);

	void SetStatus(unsigned int HP, unsigned int MP, unsigned int attack, unsigned int Defense);
	void SetCoordinate(FApoint *pt);
	void SetCoordinate(double X, double Y);
	void SetSpeed(double sp);

	string Name();
	unsigned int HP();
	unsigned int ST();
	unsigned int Attack();
	unsigned int Defense();
	double Speed();

private:
	string name;
	/*status*/ 
	unsigned int Hp;
	unsigned int St;
	unsigned int Att;
	unsigned int Def;
	
	/*coordination*/
	FApoint *XY;
	double speed;
	/*Weapon*/
	FAweapon *Weapon;

	/* skelet */
	FAskelet *skelet;
};